package edu.wuster.blog.entity;
/*
博客实体类*/

import edu.wuster.blog.interf.AddGroup;
import jakarta.validation.constraints.NotBlank;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDateTime;


@Data
@AllArgsConstructor
@NoArgsConstructor
public class Blogpart {

    private Integer id;

    private String state;

    private Integer userId;

    private String author;

    @NotBlank(message = "标题不能为空", groups = AddGroup.class)
    private String title;

    @NotBlank(message = "博客内容不能为空", groups = AddGroup.class)
    private String text;

    private LocalDateTime createTime;

    private Integer likeNum;

    private Integer isDelete;

}
